package com.example.chat.service;

import com.dragonsoftbravo.libs.Opr;

/**
 * @author pq
 * @date 2022/8/16 10:00
 * @description 从配置文件获取错误码对应的文案
 * @modified
 **/
public interface CodeMessageService {
    String message(String code);

    /**
     * @author pq
     * @description
     * @param operator
     * @param code
     * @return com.dragonsoftbravo.libs.Opr<T>
     * @date 2022/8/16 10:01
     */
    <T> Opr<T> fail(String operator, String code);

    /**
     * @author pq
     * @description
     * @param message
     * @param code
     * @return com.dragonsoftbravo.libs.Opr<T>
     * @date 2022/8/16 10:01
     */
    <T> Opr<T> failWithMessage(String message, String code);
}
